/**
 * ------------------------------------------------------------------
 * Sass Minxins
 *
 * 参考收集：
 * https://github.com/twbs/bootstrap-sass/tree/master/assets/stylesheets/bootstrap/mixins
 * ------------------------------------------------------------------
 *
 * @author  JeffMa
 * @link    https://devework.com/
 * @data    2017-06-11
 */


@mixin word-break() {
    word-break: break-all;
    word-wrap: break-word;
    white-space: normal;
}


// 清除浮动
@mixin clearfix() {
    &:before,
    &:after {
        content: " "; // 1
        display: table; // 2
    }
    &:after {
        clear: both;
    }
}

// Single side border-radius
@mixin border-top-radius($radius) {
    border-top-right-radius: $radius;
    border-top-left-radius: $radius;
}

@mixin border-right-radius($radius) {
    border-bottom-right-radius: $radius;
    border-top-right-radius: $radius;
}

@mixin border-bottom-radius($radius) {
    border-bottom-right-radius: $radius;
    border-bottom-left-radius: $radius;
}

@mixin border-left-radius($radius) {
    border-bottom-left-radius: $radius;
    border-top-left-radius: $radius;
}



//flex box
@mixin flexbox($jc:space-between, $ai:center, $fd:row, $fw:nowrap) {
    display: flex;
    flex: 1;
    display: -webkit-flex;
    justify-content: $jc;
    -webkit-justify-content: $jc;
    align-items: $ai;
    -webkit-align-items: $ai;
    flex-direction: $fd;
    -webkit-flex-direction: $fd;
    flex-wrap: $fw;
    -webkit-flex-wrap: $fw;
}

@mixin textoverflow($clamp:1) {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    -o-text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: $clamp;
    /*! autoprefixer: off */
    -webkit-box-orient: vertical;
    /* autoprefixer: on */
}

@mixin borderBottom() {
    border-bottom: 1px solid $colorBorder;
}